<%--
 *  File:    ProdEditDesc.jsp
 *  @Author: Langerwang 
 *  Date:    2001/01/14
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  //init param
  Category cat = Category.getInstance("jsp.ProdEditDesc");  
  String privilegeCode = "10203,L203";
  String strModuleName = "PCM";
%>

<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>

<html>
<head>
<title>ProdEditDesc</title>
<PageFlow:CheckPageFlow pageName="prodeditdesc"/>
<%@ include file="/inc/InitEdit.inc" %>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="../../js/FuncLib.js"></script>
<script language="JavaScript" src="../../js/ScriptLib.js"></script>
<%
  Integer oProductLangId=null;
  String strProdPD=null;
  if(pageContext.getAttribute("productinfo")!=null)
  {
    oProductLangId=(Integer)((HashMap)pageContext.getAttribute("productinfo")).get("productlangid");
    strProdPD=(String)((HashMap)pageContext.getAttribute("productinfo")).get("primarydesc");
  }
          
%>
<script language="JavaScript">

function checkProdEditDesc(form)
{
  return true;
}

function page_done()
{
  if(!checkForm(document.prodeditdescform))return;     
  if(!checkProdEditDesc(document.prodeditdescform))
  {
    return;
  }  
  if(!checkNull(document.prodeditdescform))  
    return;
  <%--if(strProdPD==null){--%>
  MLCSTransform(prodeditdescform);
  <%--}else{--%>
  emptyToNull(document.prodeditdescform);         
  <%--}--%>
  prodeditdescform.numrows.value = Number(<%= ConstantProp.multiLangNumber %>)*(0+1);
   
  
  document.prodeditdescform.actionname.value = "done";
  isRunning = true;
  document.prodeditdescform.submit();
}
var popwindow;
function page_mulilang(name,label,num,need)
{
  
  if(popwindow!=null)
    popwindow.close();
  var strurl="../../common/Lang.jsp?<%= OvalTools.randomURL() %>&form=prodeditdescform&module=PCM&mlctype="+label+"&nativelanguage="+need+"&schema=ovproductlang&entityid=<custom:write name="productinfo" property="prodid"/>&entitytype="+name+"&contentid=productlangid&colindex="+num;
  var strStatus= "height=250, width=250,top=100,left=100,toolbar=n0, menubar=no, scrollbars=no, resizable=no, location=no, status=no";
  popwindow=window.open(strurl, "newwindow",strStatus);
}
function page_back()
{
  //parent.location.href="ProdMgmtFrm.jsp?<%= OvalTools.randomURL() %>";
  parent.up.page_goback();
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table border=0 cellpadding=0 cellspacing=0 width="100%">
  <tr> 
    <td valign=top>
      <table border=0 cellpadding=1 cellspacing=0 width="100%">
       <tbody> 
       <form name="prodeditdescform" method="post" action="../../Dispatcher">
			   <input type="hidden" name="pagename" value="prodeditdesc">
			   <input type="hidden" name="actionname">
				 <input type="hidden" name="datelastupdated" value="<%=JspHelper.filterNull( new java.sql.Date(new java.util.Date().getTime()) )%>">
         <input type="hidden" name="numrows" value="2"> 
         <custom:hidden name="productinfo" property="prodid" /> 
         <custom:hidden scope="session" property="languagecode" /> 
         <custom:hidden scope="session" name="userinfo" property="orgid" /> 
         <input type="hidden" name="forremvoe" value=" "> 
         <%
          if(oProductLangId==null){
         %>
          <input type="hidden" name="isnew" value="Y"> 
        <%}%>
 
    <tr> 
          <td bgcolor=#000000 style="PADDING-BOTTOM: 1px; PADDING-LEFT: 1px; PADDING-RIGHT: 1px; PADDING-TOP: 0px"> 
            <table bgcolor=#000000 border=0 cellpadding=0 cellspacing=0 width="100%">
              <tr> 
                <td  bgcolor=#ffffff style="PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; PADDING-TOP: 3px"> 
                  <div id=div1 style="HEIGHT: 450px; OVERFLOW: auto" >
          
        <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">

          <tr> 
            <td colspan="4" class="td_right"><a onclick="page_done();"><custom:button type="2" label="L_Save" imgsrc="save_btn.gif" border="0"/></a></td>
          </tr>
          <tr> 
            <td colspan="2" class="deepblue-left"><img src="../../images/<%= strLanguageCode %>/quote.gif"> 
              <%= label.getLabelName("L_Description") %>:</td>
          </tr>
          <tr> 
            <td class="need" width="200"><%= label.getLabelName("L_PrimaryDesc") + label.getLabelName("L_Colon") %></td>
            <td> 
              <custom:text name="productinfo" property="primarydesc" size="42" command="notnull" module="PCM" label="L_PrimaryDesc" needMLC="true" isFirstMLC="true" multiLangType="prdpd" entityId="prodid" contentId="productlangid" colIndex="0"/>
              <a onclick="page_mulilang('prdpd','L_PrimaryDesc',0,'need');"><custom:button type="3" label="L_Ln" imgsrc="ln.gif" border="0"/></a> 
            
            </td>
          </tr>
         <tr> 
            <td class="td-text"><%= label.getLabelName("L_SummaryDesc") + label.getLabelName("L_Colon") %></td>
            <td colspan="3" > 
              <custom:textarea name="productinfo" property="summarydesc" cols="60" rows="2"  module="PCM" label="L_SummaryDesc" needMLC="true"  multiLangType="prdsd"  colIndex="0"/>
              <a onclick="page_mulilang('prdsd','L_SummaryDesc',0,'');"><custom:button type="3" label="L_Ln" imgsrc="ln.gif" border="0"/></a> 
            
            </td>
          </tr>
          <tr> 
            <td class="td-text"><%= label.getLabelName("L_DetailDesc") + label.getLabelName("L_Colon") %></td>
            <td> 
              <custom:textarea name="productinfo" property="detaildesc" cols="60" rows="3"  module="PCM" label="L_DetailDesc" needMLC="true"  multiLangType="prddd"  colIndex="0"/>
              <a onclick="page_mulilang('prddd','L_DetailDesc',0,'');"><custom:button type="3" label="L_Ln" imgsrc="ln.gif" border="0"/></a> 
            
            </td>
          </tr>
        <tr> 
            <td class="td-text"><%= label.getLabelName("L_WarrantyDesc") + label.getLabelName("L_Colon") %></td>
            <td>
              <custom:text name="productinfo" property="warrantydesc" size="42"  module="PCM" label="L_WarrantyDesc" needMLC="true"  multiLangType="prdwd"  colIndex="0"/>
              <a onclick="page_mulilang('prdwd','L_WarrantyDesc',0,'');"><custom:button type="3" label="L_Ln" imgsrc="ln.gif" border="0"/></a> 
            
            </td>
          </tr>
         <tr> 
            <td class="td-text"><%= label.getLabelName("L_AuthPrerequirement") + label.getLabelName("L_Colon") %></td>
            <td>
              <custom:text name="productinfo" property="authprerequirement" size="42"  module="PCM" label="L_AuthPrerequirement" needMLC="true"  multiLangType="prdap"  colIndex="0"/>
              <a onclick="page_mulilang('prdap','L_AuthPrerequirement',0,'');"><custom:button type="3" label="L_Ln" imgsrc="ln.gif" border="0"/></a> 
            
            </td>
          </tr>
          <tr> 
            <td class="td-text"><%= label.getLabelName("L_SpecialHandleInstr") + label.getLabelName("L_Colon") %></td>
            <td> 
              <custom:text name="productinfo" property="specialhandleinstr" size="42"  module="PCM" label="L_SpecialHandleInstr" needMLC="true"  multiLangType="prdshi"  colIndex="0"/>
              <a onclick="page_mulilang('prdshi','L_SpecialHandleInstr',0,'');"><custom:button type="3" label="L_Ln" imgsrc="ln.gif" border="0"/></a> 
            
            </td>
          </tr>
          <tr> 
            <td class="td-text"><%= label.getLabelName("L_AvailableCountry") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text name="productinfo" property="availablecountry" size="42"  module="PCM" label="L_AvailableCountry" needMLC="true"  multiLangType="prdac"  colIndex="0"/>
              <a onclick="page_mulilang('prdac','L_AvailableCountry',0,'');"><custom:button type="3" label="L_Ln" imgsrc="ln.gif" border="0"/></a> 
            
           </td>
          </tr>
        </table>
        </div> 
      </td>
    </tr>  
   </table>     
  </td>
 </tr>
    
  </form>
   </tbody>
</table>
    </td>
    </tr>
    <tr> 
      <td class="summary_top"></td>
    </tr>
    <tr> 
      <td class="td_center"><a onclick="page_back()"><custom:button type="1" label="L_Back" imgsrc="back.gif" border="0" style="width:60"/></a></td>
    </tr>	
</table>
</body>
</html>


